package com.yociyy.gen.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 代码生成器配置类
 * 
 * @author: YoCiyy
 * @date: 2020/4/28
 */
@Component
@ConfigurationProperties(prefix = "gen")
@PropertySource(value = { "classpath:generator.properties" },encoding = "utf-8")
public class GenConfig {

	/** 作者 */
	public static String author;

	/** 包名 */
	public static String packageName;

	/** 表前缀 */
	public static String tablePrefix;

	/** 模块名 */
	public static String moduleName;

	/** 业务名 */
	public static String businessName;

	/** 功能名 */
	public static String functionName;

	/** 列类型Map */
	public static Map<String, String> columnType;

	public void setAuthor(String author) {
		GenConfig.author = author;
	}

	public static String getAuthor() {
		return author;
	}

	public void setPackageName(String packageName) {
		GenConfig.packageName = packageName;
	}

	public static String getPackageName() {
		return packageName;
	}

	public void setTablePrefix(String tablePrefix) {
		GenConfig.tablePrefix = tablePrefix;
	}

	public static String getTablePrefix() {
		return tablePrefix;
	}

	public void setColumnType(Map<String, String> columnType) {
		GenConfig.columnType = columnType;
	}

	public static Map<String, String> getColumnType() {
		return columnType;
	}

	public static String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		GenConfig.moduleName = moduleName;
	}

	public static String getBusinessName() {
		return businessName;
	}

	public void setBusinessName(String businessName) {
		GenConfig.businessName = businessName;
	}

	public static String getFunctionName() {
		return functionName;
	}

	public void setFunctionName(String functionName) {
		GenConfig.functionName = functionName;
	}

}
